package com.bestcem.xm.award.grpc.service.param.award;

import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 查询用户请求中所有奖励数量和状态为请求通过的奖励数量
 *
 * @author jie.yao <jie.yao@idiaoyan.com>
 * @version v1.0
 * @date 2021/7/8 18:18
 */
@ToString
@NoArgsConstructor
@Getter
@Setter
public class GetRequestStatsParam {

    /**
     * 奖励id
     */
    @NotBlank(message = ErrorMessage.AWARD_ID_NULL_ERROR)
    @Pattern(regexp = RegTypes.OBJECT_ID, message = ErrorMessage.AWARD_ID_FORMAT_ERROR)
    private String awardId;

    /**
     * 投放id
     */
    private String deliverId;

    /**
     * 公司id
     */
    @NotBlank(message = ErrorMessage.ORG_ID_NULL_ERROR)
    private String orgId;

    public static class ErrorMessage {
        public static final String AWARD_ID_NULL_ERROR = "奖励id不能为空";
        public static final String AWARD_ID_FORMAT_ERROR = "奖励id格式错误";
        public static final String ORG_ID_NULL_ERROR = "组织id不能为空";
    }
}
